<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .text {
      width: 20px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .text2 {
      line-height: 20px;
      width: 100px;
      overflow: hidden;
      -webkit-line-clamp: 2;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      word-break: break-word;
      white-space: normal;

    }
  </style>

<body>
  <div class="text">
    111111111111111111111111
  </div>
  <div class="text2">
    11111111111111111111111111111111111111111111111111111111111
  </div>

</body>

</html>